<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="/WEB-INF/template/basicTemplate.xhtml">


	<ui:define name="content">
		<h:inputHidden rendered="#{menuController.userRank != 1}" value="#{menuController.redirect()}"></h:inputHidden>
		<h:inputHidden value="#{menuController.setUrl(request.requestURL)}"></h:inputHidden>
		<h:inputHidden rendered="#{menuController.userRank == 1}">
	
		<h:form>
			<fieldset class="fieldset">
			<br></br>

			<h:messages id="emailInvalid" styleClass="info"></h:messages>
			<h:panelGrid columns="2"> 
				<h:outputText styleClass="boldText" value="To:"></h:outputText>
				
				<h:inputText disabled="#{emailValidator.disabled}" styleClass="inputText emailText" value="#{emailBean.email}">
				<f:validator validatorId="emailValidator" />
					</h:inputText>
				<h:outputText styleClass="boldText" value="Subject:"></h:outputText>
				<h:inputText disabled="#{emailValidator.disabled}" styleClass="inputText emailText" value="#{emailBean.subject}"></h:inputText>
				
				<h:outputText styleClass="boldText" value="Message:"></h:outputText>
				<h:inputTextarea disabled="#{emailValidator.disabled}" styleClass="email" value="#{emailBean.message}"  ></h:inputTextarea>

			</h:panelGrid>
				<br></br>
				<div class="emailbut">
				<h:commandButton value="Send"
					action="#{emailBean.sendEmail()}" styleClass="button"></h:commandButton>
				
				<h:commandButton value="Back"
					 action="#{viewCandidatesBean.backFromSend}" styleClass="button"></h:commandButton>
				</div>
	
			
			</fieldset>

		</h:form>
		</h:inputHidden>
	</ui:define>

</ui:composition>
</html>